import request from '@/utils/request'
import { objectToFormData} from '@/utils/form'


export function findLayerList(params) {
  return request({
    url: '/scene/biz/layer/list',
    method: 'get',
    params:params
  })
}

export function saveLayer(params) {
  return request({
    url: '/scene/biz/layer/save',
    method: 'post',
    data: objectToFormData(params)
  })
}

export function deleteLayer(params) {
  return request({
    url: '/scene/biz/layer/deleteById',
    method: 'get',
    params:params
  })
}

export function findLayerAll(params) {
  return request({
    url: '/scene/biz/layer/findAll',
    method: 'get',
    params:params
  })
}

export function getOptions(params) {
  return request({
    url: '/scene/biz/layer/getOptions',
    method: 'get',
    params:params
  })
}

export function findStyleById(params) {
  return request({
    url: '/scene/biz/layer/findStyleById',
    method: 'get',
    params:params
  })
}

export function addPoiStyle(params) {
  return request({
    url: '/scene/biz/layer/addPoiStyle',
    method: 'get',
    params:params
  })
}

export function savePoiStyle(params) {
  return request({
    url: '/scene/biz/layer/savePoiStyle',
    method: 'post',
    data: objectToFormData(params)
  })
}
